package aglieBpm.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import aglieBpm.entity.BpmConfig;
import aglieBpm.service.BpmConfigService;

@Controller
@RequestMapping("/bpm/config")
public class BpmConfigController {

	@Resource
	private BpmConfigService bpmConfigService ;
	
	@RequestMapping("/index")
	public String index() {
		return "bpmConfig";
	}
	
	@ResponseBody
	@GetMapping("listAllConfigs")
	public List<BpmConfig> listAllConfigs() {
		return bpmConfigService.listAllConfigs() ;
	}
	

}
